package cn.hgy.domain.activity.service.trial.thread;

import cn.hgy.domain.activity.model.valobj.SkuVO;
import cn.hgy.domain.activity.repository.IActivityRepository;

import java.util.concurrent.Callable;

public class QuerySkuVODFromDBThreadTask implements Callable<SkuVO> {

    private final String goodsId;
    private final IActivityRepository activityRepository;

    public QuerySkuVODFromDBThreadTask(String goodsId, IActivityRepository activityRepository) {
        this.goodsId = goodsId;
        this.activityRepository = activityRepository;
    }

    @Override
    public SkuVO call() throws Exception {
        return activityRepository.querySkuBuyGoodsId(goodsId);
    }
}
